package org.xxforest.game.notsing.screen.chess;

import org.xxforest.game.core.XX;
import org.xxforest.game.core.scenes.scene2d.XXLayer;
import org.xxforest.game.core.scenes.scene2d.XXScreen;
import org.xxforest.game.core.scenes.scene2d.selector.XXScheduleSelector;
import org.xxforest.game.core.scenes.scene2d.ui.XXLable;

import com.badlogic.gdx.Gdx;

public class ChessScreen extends XXScreen {

	private XXLayer chessLayer ;
	
	@Override
	public void onCreate() {
		chessLayer = ChessLayer.create(getWidth(), getHeight());
		
		final XXLable lable = XXLable.create("FPS:0");
		lable.setPosition(0,XX.data.getGraphicHeight());
		
		this.add(lable);
		
		this.addSelector(new XXScheduleSelector() {
			@Override
			public void run() {
				lable.setText("FPS:"+Gdx.graphics.getFramesPerSecond());
			}
		}, 0.2f);
		
		this.add(chessLayer);
	}
	
	@Override
	public void pause() {
	}

	@Override
	public void resume() {
	}

	@Override
	public void show() {
	}

	@Override
	public void hide() {
	}

	@Override
	public void dispose() {
	}

}
